import request from '@/utils/request'

export function villageList(query) {
  return request({
    url: '/village/list',
    method: 'get',
    params: query
  })
}

export function fetchLabel(id) {
  return request({
    url: '/village/detail/' + id,
    method: 'get'
  })
}

export function updateStore(id, data) {
  return request({
    url: '/village/update/' + id,
    method: 'put',
    data
  })
}

export function addStore(data) {
  console.log('addrStore')
  console.log(data)
  return request({
    url: '/village/add',
    method: 'post',
    data
  })
}

export function deleteStore(id) {
  return request({
    url: `/village/delete/${id}`,
    method: 'delete'
  })
}
